public class test {

    public static void main(String[] args) {
        MyLinkedList myLinkedList = new MyLinkedList();
        myLinkedList.addLast(2);
        myLinkedList.addLast(5);
        myLinkedList.addLast(5);
        myLinkedList.addLast(5);
        myLinkedList.addLast(5);
        myLinkedList.addLast(2);
        myLinkedList.addLast(3);
        myLinkedList.addLast(4);
        myLinkedList.addLast(5);
        myLinkedList.addLast(2);

        myLinkedList.display();
        System.out.print("删除一个5:");
        myLinkedList.remove(5);
        myLinkedList.display();
        System.out.print("删除所有2:");
        myLinkedList.removeAllKey(2);
        myLinkedList.display();
        System.out.print("长度为:");
        System.out.println(myLinkedList.size());
        myLinkedList.clear();

    }
}
